package com.wzu.zlb.ems.service.impl;

import com.wzu.zlb.ems.dao.OrderMapper;
import com.wzu.zlb.ems.pojo.Order;
import com.wzu.zlb.ems.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Transactional
@Service("orderService")
public class OrderServiceImpl implements OrderService {

    @Autowired
    private OrderMapper orderMapper;

    @Override
    public List<Order> findAllOrders() {
        return orderMapper.findAllOrders();
    }

    @Override
    public Order findOrderById(Integer id) {
        return orderMapper.findOrderById(id);
    }


    @Override
    public List<Order> searchOrders(Order order) {
        return orderMapper.searchOrders(order);
    }

    @Override
    public Integer addOrder(Order order) {
        return orderMapper.addOrder(order);
    }

    @Override
    public Integer modifyOrder(Order order) {
        return orderMapper.modifyOrder(order);
    }

    @Override
    public Integer deleteOrder(Integer id) {
        return orderMapper.deleteOrder(id);
    }

    @Override
    public Integer modifyOrderPro(Order order) {
        return orderMapper.modifyOrderPro(order);
    }


}
